feat(cmd): add 'list' flag to create command#333
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #333 +/- ##
==========================================
+ Coverage 64.68% 64.72% +0.03%
==========================================
Files 212 212
Lines 17782 17809 +27
==========================================
+ Hits 11502 11526 +24
- Misses 5206 5208 +2
- Partials 1074 1075 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| for _, category := range categories { | ||
| templates := getSelectionOptions(clients, category.id) |
There was a problem hiding this comment.
⭐ praise: This is a nice filter setup!
mwbrooks
left a comment
There was a problem hiding this comment.
✅ Looks great and works well @srtaalej! Thank you!
📝 I've left some minor feedback that we're duplicating code and that it can lead to errors down the road. Non-blocking but perhaps we can add a comment to help reduce errors and remind us to refactor this area?
🍿 Test worked well!
2026-02-09-create-list-flag.mov
| categories = []categoryInfo{ | ||
| {id: "slack-cli#getting-started", name: "Getting started"}, | ||
| {id: "slack-cli#ai-apps", name: "AI Agent apps"}, | ||
| {id: "slack-cli#automation-apps", name: "Automation apps"}, | ||
| } |
There was a problem hiding this comment.
suggestion(non-blocking): Not a deal breaker, but I don't like that we're duplicating the categories in 2 areas. In getSelectionOptionsForCategory(...) we already list the category titles and now we're duplicating the categories here. We're also slightly changing the titles ("AI Agent app" vs "AI Agent apps" / "Starter app" vs "Getting started"). This will become more error-prone if we add or change categories later on.
We don't need to refactor this if it's complicated, but we should at least add a comment in both sections noting that changes must occur in the other section. And we should try to keep the naming consistent.
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Changelog
The templates available to the
createcommand can now be shown without requiring an immediate selection with the--listflag.Summary
This PR adds
--listflag toslack createto print available app templates non-interactively and toslack create agentto print only agent templates.Requirements